﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;

namespace abp
{
    public class AuthorizationService:IAuthorizationService
    {
        public async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, IEnumerable<IAuthorizationRequirement> requirements)
        {
//            throw new NotImplementedException();

            Debug.WriteLine("测试授权");

            return await Task.Run(() => AuthorizationResult.Success());
        }

        public async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName)
        {
//            throw new NotImplementedException();

            Debug.WriteLine("测试授权");
            return await Task.Run(() => AuthorizationResult.Success());
        }
    }
}
